package com.my.code.map;

/**
 * -
 *
 * @author zzl
 * @date 2020/10/12
 */
public class TestLRU {

    public static void main(String[] args) {
        LRUCache<String, Integer> cache = new LRUCache<>(5);
        cache.put("a", 1);
        cache.put("b", 2);
        cache.put("c", 3);
        cache.put("d", 4);

        cache.get("c");
        cache.get("c");
        cache.get("a");

        cache.put("e", 5);
        cache.put("f", 6);

        System.out.println("cache = " + cache);
    }


}
